package com.chinaoly.sdk.data;



import com.chinaoly.sdk.exception.ExceptionHandle;

import io.reactivex.functions.Consumer;

/**
 * Created by chenjian on 2019/6/13 16:55.
 */
public class AbnormalConsumer implements Consumer<Throwable> {
    public AbnormalConsumer(DataCallBackListener l) {
        this.l = l;
    }

    private final DataCallBackListener l;
    @Override
    public void accept(Throwable throwable) throws Exception {
        l.onDataNotAvailable(ExceptionHandle.handleException(throwable));
    }
}
